package com.alibaba.controller;

import com.alibaba.bean.PostNote;
import com.alibaba.bean.PostResult;
import com.alibaba.service.PostService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/post", method = RequestMethod.GET)
public class PostController {

    @Autowired
    private PostService postService;

    @PostMapping("/postNote")
    public PostResult postNote(PostNote postNote) {
        return postService.send(postNote);
    }

}
